using System;
using System.Collections.Generic; 
using System.Linq;  
using System.Text;  
using System.Data.Linq.Mapping;
using System.ComponentModel;

namespace MRSite.Entity  
{
     [Table(Name = "order_item")] 
	 public class OrderItem : Entity
    { 
		/// <summary>
		///自增ID
		/// </summary>
		[Column(Name = "id", IsPrimaryKey = true, CanBeNull = false, IsVersion = true)]
		public override int id{ get; set; } 

		/// <summary>
		///商品ID
		/// </summary>
		[Column(Name = "article_id")]
		public int article_id{ get; set; } 

		/// <summary>
		///订单ID
		/// </summary>
		[Column(Name = "order_id")]
		public int order_id{ get; set; } 

		/// <summary>
		///商品货号
		/// </summary>
		[Column(Name = "goods_no")]
		public String goods_no{ get; set; } 

		/// <summary>
		///商品标题
		/// </summary>
		[Column(Name = "goods_title")]
		public String goods_title{ get; set; } 

		/// <summary>
		///商品图片
		/// </summary>
		[Column(Name = "img_url")]
		public String img_url{ get; set; } 

		/// <summary>
		///规格描述
		/// </summary>
		[Column(Name = "spec_text")]
		public String spec_text{ get; set; } 

		/// <summary>
		///商品价格
		/// </summary>
		[Column(Name = "goods_price")]
		public Decimal goods_price{ get; set; } 

		/// <summary>
		///实际价格
		/// </summary>
		[Column(Name = "real_price")]
		public Decimal real_price{ get; set; } 

		/// <summary>
		///订购数量
		/// </summary>
		[Column(Name = "quantity")]
		public int quantity{ get; set; } 

		/// <summary>
		///赠送积分,正数赠送|负数消费
		/// </summary>
		[Column(Name = "point")]
        public Decimal point { get; set; }

        /// <summary>
        ///扣除积分
        /// </summary>
        [Column(Name = "sell_point")]
        public Decimal sell_point { get; set; }

        /// <summary>
        /// PV值，用来给奖励
        /// </summary>
        [Column(Name = "PV")]
        public Decimal PV { get; set; }

        /// <summary>
        /// 店铺id
        /// </summary>
        [Column(Name = "shopid"), DefaultValue(0)]
        public int shopid { get; set; }

         
        /// <summary>
        /// 店铺设置的优惠红包
        /// </summary>
        [Column(Name = "hongbao")]
        public Decimal hongbao { get; set; }

        /// <summary>
        ///应赠送贡献值
        /// </summary>
        [Column(Name = "score"), DefaultValue(0)]
        public decimal score { get; set; }

        /// <summary>
        /// 首购奖励 赠送红包
        /// </summary>
        [Column(Name = "hongbao_first")]
        public Decimal hongbao_first { get; set; }

        /// <summary>
        /// 首购奖励 赠送贡献值
        /// </summary>
        [Column(Name = "score_first")]
        public Decimal score_first { get; set; }

           /// <summary>
        /// 物流费用
        /// </summary>
        [Column(Name = "express_fee")]
        public Decimal express_fee { get; set; }


        /// <summary>
        ///订单状态1生成订单,2确认订单,3完成订单,4取消订单,5作废订单
        /// </summary>
        [Column(Name = "status")]
        public int status { get; set; }

        /// <summary>
        ///下单时间
        /// </summary>
        [Column(Name = "add_time")]
        public DateTime add_time { get; set; }

        /// <summary>
        ///确认时间
        /// </summary>
        [Column(Name = "confirm_time")]
        public DateTime? confirm_time { get; set; }

        /// <summary>
        ///订单完成时间
        /// </summary>
        [Column(Name = "complete_time")]
        public DateTime? complete_time { get; set; }

        /// <summary>
        ///支付状态1未支付2已支付
        /// </summary>
        [Column(Name = "payment_status")]
        public int payment_status { get; set; } 
        /// <summary>
        ///支付时间
        /// </summary>
        [Column(Name = "payment_time")]
        public DateTime? payment_time { get; set; }

        /// <summary>
        ///发货状态1未发货2已发货
        /// </summary>
        [Column(Name = "express_status")]
        public int express_status { get; set; }

        /// <summary>
        ///发货时间
        /// </summary>
        [Column(Name = "express_time")]
        public DateTime? express_time { get; set; }

        /// <summary>
        ///用户ID
        /// </summary>
        [Column(Name = "user_id")]
        public int user_id { get; set; }

        /// <summary>
        /// 应给首购奖励 赠送红包
        /// </summary>
        [Column(Name = "hongbao_first_jl")]
        public Decimal hongbao_first_jl { get; set; }

        /// <summary>
        /// 应给首购奖励 赠送贡献值
        /// </summary>
        [Column(Name = "score_first_jl")]
        public Decimal score_first_jl { get; set; }


        /// <summary>
        ///应付商品总金额
        /// </summary>
        [Column(Name = "payable_amount")]
        public Decimal payable_amount { get; set; }

        /// <summary>
        ///实付商品总金额(现金部分)
        /// </summary>
        [Column(Name = "real_amount")]
        public Decimal real_amount { get; set; }

        /// <summary>
        ///订单总金额 (包括运费)
        /// </summary>
        [Column(Name = "order_amount")]
        public Decimal order_amount { get; set; }

        /// <summary>
        /// 总折扣奖励
        /// </summary>
        [Column(Name = "hongbao_total")]
        public Decimal hongbao_total { get; set; }
        /// <summary>
        /// 总贡献值奖励
        /// </summary>
        [Column(Name = "score_total")]
        public Decimal score_total { get; set; } 
	 } 
}    


